import request from '@/utils/request'

export function getHospitalList(class_id, sort_key, sort_val, page, per_page, area) {
  if (area) {
    return request({
      url: '/hospital/list',
      method: 'get',
      params: {
        class_id,
        sort_key,
        sort_val,
        area,
        page,
        per_page
      }
    })
  } else {
    return request({
      url: '/hospital/list',
      method: 'get',
      params: {
        class_id,
        sort_key,
        sort_val,
        page,
        per_page
      }
    })
  }
}

export function getHospitalRanking(sort_key, sort_val, page, per_page) {
  return request({
    url: '/hospital/list',
    method: 'get',
    params: {
      sort_key,
      sort_val,
      page,
      per_page
    }
  })
}
